package org.NooLab.glue.instances;

import java.util.Observer;
import java.util.Vector;

import org.NooLab.glue.components.pkg.TaskPackage;
import org.NooLab.glue.subscription.FilterPackageIntf;
import org.NooLab.glue.transaction.Transaction;



public interface ParticipantSourceIntf extends ParticipantBaseIntf{

	public static final String roleOfInstance = "SOURCE" ;
	
	/**  */
	public void setTask(TaskPackage taskPackage);
	
 
	/** will send the previously defined TaskPackage  */
	public void send(); 

	/** will send the previously defined TaskPackage ;
	 */
	public void send( int routableHops ); 

	public void send( String xmlout, Observer obs); 
	public void send( String xmlout); 
	public void send( String xmlout, int routableHops, Observer obs );
	
	public void retrieveAll(); 
	
	/** the completion marker provides the possibility to initialize a local client-side buffer
	 * for results from distributed process. The application will see the results only after all
	 * partial results have been received. */
	public void setResultsCompletionMarker();
	
	public void handlingFailedTransactions( Transaction transaction ) ;
	
	public int cancelTask( long transactionID) ;
	public int cancelTask() ;
	public void cancelAll() ;
	
	/**    */
	public Vector<Long> getOpenedTransactionsID() ;
	
	/**   */
	public void requestAliveNotifications(long period);
	
	/** is directed primarily towards the Receptor, realizes "efferent" communication (taking the SOURCE as kind of a sensory)
	    besides the transfer of tasks, e.g. how to "behave" in reaction to the tasks 
		yet, the MessageBoard can read it and sneaks in for particular control tasks directed to the Receptor */
	public void setControlPackage();
	
	/** is directed to the MessageBoard, transports semantic filters */
	public void setContextPackage();
	
	
}
